package com.jeeplus.modules.common.excel.core;

import com.alibaba.excel.annotation.ExcelIgnore;
import lombok.Data;
import org.apache.commons.collections.map.HashedMap;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Data
public abstract class ExcelEntity<T> {

    // 缓存KEY
    @ExcelIgnore
    protected String redisKey;

    // 判断列头用Map
    @ExcelIgnore
    protected Map<String,String> headMap = new HashedMap();

    // 缓存KEY
    @ExcelIgnore
    protected String[] titles;

    // 场景
    @ExcelIgnore
    private String importScene;

    // 导入数据
    @ExcelIgnore
    protected List<T> dataList = new ArrayList<>();
    @ExcelIgnore
    protected List<T> successList = new ArrayList<>();
    @ExcelIgnore
    protected List<T> errorList = new ArrayList<>();

    // 进度条数据
    @ExcelIgnore
    int totalCount = 0;        // 总数
    @ExcelIgnore
    int doneCount = 0;         // 已完成数
}
